﻿
#ifndef _SOUNDGAME_H_
#define _SOUNDGAME_H_
#include "CAudio.h"
#include <vector>
using namespace std;

enum EBGSound
{
	EMenuSound,
	EMainGameSound1,
	EMainGameSound2,
	EMainGameSound3
};

enum ESoundEffect
{
	ES_BreakBrick,
	ES_Coin,
	ES_MarioDie,
	ES_ItemUp,
	ES_MarioJump,
	ES_MarioLifeUp,
	ES_MarioGrowUp,
	ES_Super,
	ES_Shoot,
	ES_KickUp,
	ES_FungiDie,
	ES_TurtleHit,
	ES_Win,
	ES_Lose,
	ES_Click
};
class SoundManager
{
private:
	CAudio* _audio;
	//List of effect sound
	vector<CSound*> _listSoundEffect;
	//List of background sound (looped play sound)
	vector<CSound*> _listBgm;

	//BackGround Music
	CSound *bgmMenu;
	CSound *bgmGame1;
	CSound *bgmGame2;
	//Sound Effect
	CSound *jumpSound;
	CSound *lifeUpSound;
	CSound *growUpSound;
	CSound *superSound;
	CSound *shootSound;
	CSound *dieSound;

	CSound *breakBrickSound;
	CSound *itemUpSound;
	CSound *coinSound;
	CSound *kickUp;
	CSound *fungiDie;
	CSound *turtleHit;
	CSound *win;
	CSound *lose;
	CSound *click;
	SoundManager();
	static SoundManager* _instance;
public:
	static SoundManager* GetInst();
	static bool isBGM_On;
	static bool isSoundEffect_On;
	~SoundManager();

	void PlayBGSound(EBGSound);
	void PlaySoundEffect(ESoundEffect);
	void StopAllBGSound();
	void RemoveAllBGM();
	void ResumeBGM();
};

#endif